﻿package mortal.game.view.investmentProject
{
    import Message.Game.*;
    import flash.utils.*;

    public class InvestmentCache extends Object
    {
        public var investmentDic:Dictionary;

        public function InvestmentCache()
        {
            this.investmentDic = new Dictionary();
            return;
        }// end function

        public function getTodayInfoByType(param1:int, param2:int = 0) : SInvestInfo
        {
            var _loc_3:SInvestInfo = null;
            var _loc_4:* = this.investmentDic[param1];
            if (_loc_4)
            {
                if (param2 > 0)
                {
                    _loc_3 = _loc_4[(param2 - 1)];
                }
                else
                {
                    _loc_3 = _loc_4[(_loc_4.length - 1)];
                }
            }
            return _loc_3;
        }// end function

        public function getDaysByType(param1:int) : int
        {
            var _loc_2:int = 0;
            var _loc_3:* = this.investmentDic[param1];
            if (_loc_3)
            {
                _loc_2 = _loc_3.length;
            }
            return _loc_2;
        }// end function

    }
}
